package com.example.human_resource_management.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.human_resource_management.entry.dto.LoginDto;
import com.example.human_resource_management.entry.po.User;
import com.example.human_resource_management.service.UserService;
import com.example.human_resource_management.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author Lenovo
* @description 针对表【user】的数据库操作Service实现
* @createDate 2025-06-09 08:35:45
*/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
    implements UserService{

    @Autowired
    private UserMapper userMapper;

    @Override
    public User login(LoginDto loginDto) {
        return userMapper.findUserByUsernameAndPassword(loginDto.getUsername(), loginDto.getPassword());
    }
}




